<template>
  <el-main>
    <!-- 新增按钮 -->
    <el-button
      type="success"
      size="small"
      @click="openAddWindow()"
      icon="el-icon-plus"
    >新增</el-button>

    <!--数据表格-->
    <el-table
      :data="menuList"
      style=" width: 100%;margin-top: 10px"
      :height="tableHeight"
      row-key="id"
      default-expand-all
      :tree-props="{ children: 'children' }"
      :border="true"
      stripe
    >
      <el-table-column prop="label" label="菜单名称"></el-table-column>
      <el-table-column prop="type" label="菜单类型" align="center">
        <template slot-scope="scope">
          <el-tag v-if="scope.row.type == '0'" size="normal">目录</el-tag>
          <el-tag type="success" v-else-if="scope.row.type == '1'" size="normal"> 菜单</el-tag>
          <el-tag type="warning" v-else-if="scope.row.type == '2'" size="normal"> 按钮</el-tag>
        </template>
      </el-table-column>
    </el-table>


  </el-main>
</template>


<script>
    export default {
        name: "menuList",
        components: {
            // 注册组件
            SystemDialog,
        },

        data() {
            return {
                menuList: [], //数据列表
                tableHeight: 0, //表格高度
                menuDialog: {
                    title: "",
                    width: 630,
                    height: 270,
                    visible: false,
                },

            };
        }
    }


</script>

<style scoped>

</style>
